<!---
	Title:		EPAR1.1 
	Author:		Bruce Frick
	Purpose:	NON SCF Step1 Request.  Calendar is constructed in the js file.
--->

<cfset BASE = CreateObject("component", "#session.rootDir#.cfc.base") />
<cfinclude template="/code_lib/SCF_Employee.cfm">
<cfinclude template="/code_lib/SCF_HR.cfm">
<cfinclude template="/code_lib/SCF_REGEX.cfm">

<cfoutput>
	<!---HTML header, css links, js links, and page title--->
    #BASE.htmlHeaderNonSCF(
    	"/jquery/ui-1.8.5/jquery-ui.min.js,/jquery/plugins/scrollTo/jquery.scrollTo-1.4.2-min.js,/" & session.rootDir & "/js/nonSCFStep1-Request.js", <!---JS links--->
        "/jquery/ui-1.8.5/themes/cupertino/jquery-ui.css", <!---CSS links--->
        "Step 1:  Liaison - Contractor Request", <!---Page Title--->
        "Status", <!---Active Nav Link--->
        "true" <!---Alternate menu.  Shows main EPAR links--->
    )#
    <!---HTML header, css links, js links, and page title--->
    
    
    <cfif Session.Auth EQ True and (Session.strAuthType EQ Session.LIAISONS or Session.strAuthType EQ Session.IT or Session.strAuthType EQ Session.HR)>   
        
        <!---Query objects--->
        <cfset QUERIES = StructNew() />
        <cfset QUERIES.GetAccess = CreateObject("component", "#session.rootDir#.cfc.queries").funcGetAccess() />
        <cfset QUERIES.GetContainer = CreateObject("component", "#session.rootDir#.cfc.queries").funcGetContainer() />
        <cfset QUERIES.GetNonSCFTypes = CreateObject("component", "#session.rootDir#.cfc.nonSCFStep1-RequestQueries").funcGetNonSCFTypes() />
        <cfset QUERIES.GetDepts = CreateObject("component", "#session.rootDir#.cfc.queries").funcGetDepts() />
        <!---Query objects--->
        
        
        <h1 class="title">Step 1:  Liaison - Contractor Request</h1>
        <div class="entry">    
            Welcome, #Session.arrEmpInfo.FirstName# #Session.EmpInfo.LastName#.  
            In this step, we'll capture information necessary to initiate the request 
            for the Network Account and Badge.  Please provide the following information: 
            <br /><br />  
            <div class="notes">
                <table>
                    <tr>
                        <td valign="top">
                            NOTE:&nbsp;&nbsp;
                        </td>
                        <td>
                            This page is for <u><em>NON</em></u> SCF employees only.  
                            To process SCF employees click <a href="../Step1-Hire.cfm">here</a>.
                        </td>
                    </tr>
                </table>
            </div>      
            
            <cfform name="frmStep1" method="post" action="api.cfm?api=insert_nonscf_step1_employee">
                <table>
                    <tr>
                        <td>
                        	First, MI, Last:
                        </td>
                        <td>
                            <cfinput type="text" name="First" 
                            	error_message="Please provide a first name for this individual." 
                                tabindex="5" value="">
                                
                            <cfinput type="text" name="Middle" size=1 maxlength="2" 
                            	tabindex="7" value="">    
                                                    	
                            <cfinput type="text" name="Last" 
                            	error_message="Please provide a last name for this individual." 
                                tabindex="10" value="">
                        </td>
                    </tr>
                    <tr>
                        <td>
                        	Preferred (First) Name:
                        </td>
                        <td>
                            <cfinput type="text" name="PreferredName" tabindex="20" 
                            	tooltip="Would appear in the Address Book and be used to create their network account." 
                                value="">
                        </td>
                    </tr>
                    <tr>
                        <td>
                        	SSN:
                        </td>
                        <td>
                        	<cfinput type="text" name="SSN" tabindex="25" value=""                             	
                                error_message="Please provide a valid SSN of format xxx-xx-xxxx">
                        </td>
                    </tr>
                    <tr>
                        <td>
                        	Non-SCF Type:
                        </td>
                        <td>
                            <cfselect name="NonSCFTypeID" query="QUERIES.GetNonSCFTypes" tabindex="25" 
                                value="ID" display="Type" selected=""/>
                        </td>
                    </tr>
                    <tr>
                        <td>
                        	Company Name:
                        </td>
                        <td>
                            <cfinput type="text" name="CompanyName" tabindex="30" tooltip="'Volunteer' or Contracted Company Name." 
                                value="" 
                                error_message="Please provide a Company for this individual.  Type 'Volunteer' for volunteers or use the Company the contractor works for." >
                        </td>
                    </tr>
                    <TR>
                        <TD>
                        	Department:
                        </TD>
                        <TD colspan=3>
                            <cfselect name="DeptID" query="QUERIES.GetDepts" tabindex="60" value="OrgCodeIDNo" display="Org" Selected =""/>                        
                        </TD>
                    </TR>
                    <TR>
                        <TD valign="top">
                        	Comments:
                        </TD>
                        <TD colspan=3>
                        	<cftextarea rows="2" tabindex="65" name="Comments" style="width:98%" 
                            	value="" class="spellCheckMe"/>
                        </TD>
                    </TR>
                    <tr>
                        <td colspan="4">
                        <fieldset>
                        <legend><strong>Network Account and Badge Information:</strong></legend>
                        <table>
                        <tr>
                        <td colspan=5>
                        <cfinput type="checkbox" name="NonSCFNetworkAccount" > Network Account<br />
                            <div id="NA" style="display:none">
                            <table>
                                <tr>
                                    <td width="25">&nbsp;</td>
                                    <td>
                                        Network Account to Mirror:
                                    </td>
                                    <td>
                                        #SCF_Employee_ShowDropdown_AllEmployees('MirrorAccountID', 0, 1, False, True, True, 70, "", False, "", True)#
                                    </td>
                                    <td>&nbsp;
                                        
                                    </td>
                                </tr>
                                <tr>
                                	<td width="25">&nbsp;</td>
                                    <td>
                                        Phone Ext:
                                    </td>
                                    <td>
                                        <cfinput type="text" name="DeskPhone" maxlength="6" tabindex="80" 
                                        	tooltip="If a phone already exists at the employees work station, what is the 4 digit extension?" 
                                            value="">
                                    </td>
                                </tr>
                                <TR>
                                    <td>&nbsp;</td>
                                    <TD>
                                        Location/Container:
                                    </TD>
                                    <TD>
                                        <cfselect name="ContainerID" query="QUERIES.GetContainer" tabindex="85" 
                                        	value="OUID" display="Container" selected="7"/>
                                    </TD>
                                </TR>
                            </table>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td colspan=5>
                        <cfinput type="checkbox" name="NonSCFBadge"> Badge<br />
                        <div id="Badge" style="display:none">
                        <table>
                            <tr>
                                <td width="25">&nbsp;</td>
                                <td valign="top">
                                    Position (Badge):
                                </td>
                                <td>
                                    <cfinput type="text" name="BadgePos" tabindex="100" 
                                    tooltip="Enter the Position as it should appear on the Badge" 
                                    value="" style="width:98%" 
                                    error_message="Please enter the Position as it should appear on the Badge.">
                                </td>
                            </tr>
                            <tr>
                                <td>&nbsp;</td>
                                <td valign="top">
                                    Badge Level Access:
                                </td>
                                <td>
                                    <cfselect name="BadgeAccessLevelID" tabindex="105"  multiple="yes">
                                        <option value="0" selected="selected">-- None --</option>
                                        <cfloop query="QUERIES.GetAccess">
                                            <option value="#AccessLvID#">#Descript#</option>
                                        </cfloop>
                                    </cfselect>  
                                </td>
                            </tr>
                        </table>
                        </div>
                        </td>
                    </tr> 
                    <tr>
                    	<td>&nbsp;</td>
                    </tr>                                   
                    <TR>
                    	<td width="10">&nbsp;</td>
                        <TD>
                            Estimated Start Date: <BR />
                            <!---<cfcalendar name="Start"  message="Please provide the Actual Start Date for this Account and Badge." tabindex="110" selecteddate="#Start#">--->
                            <BR />
                            <cfinput type="hidden" name="EstStartDate" value="#DateFormat(now(), 'mm/dd/yyyy')#"/>
                            <div id="EstStart_datepicker"></div>
                        </TD>
                        <td width="10">&nbsp;</td>
                        <TD valign="top">
                        	<div class="notes"><BR />NOTE:&nbsp;&nbsp;&nbsp;</div>
                        </TD>
                        <TD valign="top">
                        	<div class="notes">
                                <BR />Expiration Date for this account will be set to one (1) 
                                month from the Actual Start Date (to be confirmed by HR).  Every month, a request 
                                from the supervisor will be required to extend the expiration date.  If a request 
                                is not made, the account and badge will expire on the expiration date.
                           	</div>
                        </TD>
                    		<td width="10">&nbsp;</td>
                    		</TR>
                    		</table>
                    	</fieldset>
                    	</td>
                    </tr>
                    <tr>
                        <td colspan="5" align="right">
                            <cfinput type="button" name="Submit" value="Next >>" tabindex="120">
                        </td>
                    </tr>
                </table>
            </cfform>   
        </div>
    
    
    <cfelse>
        <cfinclude template="../denied.cfm">
    </cfif>
    
    
    <!---HTML footer, closes html and body tags.  Any footer info goes here--->
    #BASE.htmlFooterNonSCF()#
    <!---HTML footer, closes html and body tags.  Any footer info goes here--->
</cfoutput>